Create DML Parameter in dataset.
DML using parameter: From this document you will learn to create the DML dataset which contains parameter.
Follow steps to create DML using parameter dataset in OPNBI:-
Follow steps to create DML dataset in OPNBI: -
- Go to Dataset section, Click on Create DML from bottom menu bar. As shown in figure below:
- The Create Data Module dialog box looks as shown in figure below:
Enter Following detail in DML Module dialog box:
Enter name: DML Parameter Select Source: Training Mapping Expend tables from left side table view, As shown in figure below:
Drag and Drop the OFFICES and CUSTOMERS table from table box and drag to diagram box at right side, and select all the columns from Select Column dialog box, as shown in figure below:
- Click Add Parameter icon to add parameter in DML.
- After clicking on Parameter icon, the Parameter dialog box load as shown in figure below:
- Add Following values in Parameter dialog box:
Name: country, Direction: IN, Data Type: VARCHAR, Default Value: USA, Linked Parameter: None. Click on Submit button after adding the data, you can compare your screen in figure below:
- Drag and drop the COUNTRY column from OFFICES table to CUSTOMERS table, as shown in figure below:
- Click on the connection between two tables, the DML configuration will pop-up on screen. as shown in figure below:
- Click on Add Condition button, it will get the Create condition dialog box on screen.
- Select AND option from top,
COUNTRY in column, Condition as Equal, {{country}} parameter, Click on Get Condition button to submit the condition.
- Click on Submit button after adding the condition into DML Configuration.
- Create Dashboard from the Visualization section. Example name: DML Parameter, as shown in figure below:
- After loading the Dashboard, Find Analysis Icon from the left vertical menu bar, click on the icon to load analysis widget in dashboard.
- The Analysis widget will get load in dashboard automatically after clicking on the analysis icon.
- Select Dataset as DML Left join, as shown in figure below:
- As select parameter in Analysis widget, The Dataset parameter dialog box pop-up on screen with default value in country column, Click on Submit.
- Click on Field icon from widget, as shown in figure below:
- The Analysis Selection dialog box will open, in the dialog box from the Datasets (dml) dropdown select the Dataset as DML Parameter. as shown in figure below:
- From the Analysis Selection dialog box, Drag and drop the COUNTRY {For Rows} and CREDITLIMIT {For Values (Select: SUM)} from OFFICES table, and TERRITORY column {For Columns} from CUSTOMERS table, as shown in figure below.
Note: As you add value the Rows section, the Values section will take its field automatically based on Rows, user has to delete it to remove it from the box.
Click on preview button, and save and exit it.
Save the widget in Dashboard and Go to Preview window of dashboard to see the final output of Analysis Widget using parameter DML, as shown in figure below: